//
//  CommonDatabaseAccess.h
//  TopGirls
//
//  Created by Khang on 9/26/13.
//
//

#import <Foundation/Foundation.h>

@interface CommonDatabaseAccess : NSObject

+ (CommonDatabaseAccess *)shareCommonDatabaseAccess;

- (NSString*)checkDatabase:(NSString *)dbname;
- (BOOL)openDatabase:(NSString*)dbname;
- (BOOL)closeDatabase:(NSString*)dbname;
- (BOOL)isOpening:(NSString*)dbname;

- (NSArray*)executeSelectAllWhere:(NSDictionary*)conditions;

- (BOOL)executeInsertRecord:(NSDictionary*)record;
- (BOOL)executeInsertRecords:(NSArray*)records;

- (BOOL)executeUpdateValue:(NSDictionary*)value where:(NSDictionary*)conditions;

- (BOOL)executeDeleteRecordWhere:(NSDictionary*)conditions;
- (BOOL)executeDeleteAllRecords;

@end
